package com.twelve.all.presenter;

import rx.Subscription;

/**
 * Created by 张龙臣 on 2018/10/22.
 */

public class BasePresenter {

    protected Subscription mSubscription;

    public void detach() {
        if (mSubscription != null && mSubscription.isUnsubscribed())
            mSubscription.unsubscribe();
    }

//    protected <T> void doSubscription( CallBack<T> callBack){
//        detach();
//        mSubscription = NetManager.getInstance().doSubscribe(new NetManager.Model<T>(callBack) {
//            @Override
//            protected Observable<ResponseInfo<T>> getObservable() {
//                return aa();
//            }
//        });
//    }
}
